/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package polandballgame;
import java.awt.Graphics;
import java.awt.Color;

/**
 * Hero
 * @author POed
 */
public class Countryball extends GameObject {
    
    int maxHP;
    int currentHP;
    
    int maxArmor;
    int currentArmor;
    
    GameObject background;
    
    @Override public void draw(Graphics context) {
        
        // set field of view
        context.setColor(Color.white);
        context.fillRect(0, 0, Engine.width * Engine.cellSize, Engine.height * Engine.cellSize);
        
        if (background != null) {
            background.draw(context);
        }
        
        // body:
        context.setColor(Color.black);
        context.fillOval(x * Engine.cellSize, y * Engine.cellSize, Engine.cellSize, Engine.cellSize);
    }
    
    public Countryball(int xPos, int yPos) {
        
        super(xPos, yPos);
        type = 8;
        
        maxHP = 200;
        currentHP = 100;
        maxArmor = 200;
        currentArmor = 0;
    }
    
    public void grabItem(GameObject item) {
        
        if (item == null) {
            return;
        }
        
        if (item.type == 4) {
            background = item;
        }
    }
}
